//This component creates a new duplicate "New Topic" button
// which avoids modifying the existing button/translations in core
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import Composer from "discourse/models/composer";
import I18n from "I18n";
import { getFilteredSetting } from "../lib/setting-util";

export default class CustomHtml extends Component {
  @service router;
  @service currentUser;
  @service composer;

  @action
  customCreateTopic() {
    this.composer.open({
      action: Composer.CREATE_TOPIC,
      draftKey: Composer.NEW_TOPIC_KEY,
      categoryId: this.category?.id,
      tags: this.tag?.id,
    });
  }
}